@import "../../../../var";
@import "~antd/lib/style/themes/default";

@optionBlockH: 95px;

:global {
  .publishConfigSelect:not(.ant-select-customize-input) {
    color: @primaryColor;

    .ant-select-selector {
      border: none;
      background-color: #3c3c3c;
    }

    .ant-select-arrow {
      color: @secondColor;
    }
  }

  .publishConfigSelectDropDown {
    background-color: #3c3c3c;

    .ant-select-item {
      color: @secondColor;

      &.ant-select-item-option-selected, &.ant-select-item-option-active {
        background-color: #4e4e4e;
      }
    }

    .ant-empty-description {
      color: #fff;
    }
  }

}

.publish {
  flex: 1;
  height: 0;
  display: flex;
  flex-direction: column;

  .optionBlock {
    height: @optionBlockH;
    padding: 10px;
  }

  .tipConfigNotSelect {
    text-align: center;
    padding: 20px;
    color: @secondColor;
  }

  .instanceListLoading {
    width: 100%;
    text-align: center;
    padding: 50px;
    color: @secondColor;
  }

  .instanceListScroll {
    height: 0;
    flex: 1;
  }

  .clusterList {
    margin: 0;
    padding: 10px;
    color: #ccc;

    .clusterOpt {
      display: flex;

      .title {
        flex: 1;
      }

      .options {
        flex: 0 0 auto;
      }
    }

    .clusterItem {
      border-radius: 5px;
      padding: 10px;
      background-color: #2a2d2e;
      margin-top: 10px;
      display: grid;
      grid-template-columns: 30px auto;
      color: #ffffff;

      .clusterIcon {
        font-size: 20px;
      }

      .clusterName {
        line-height: 30px;
      }
    }
  }

  .instanceList {
    padding: 10px;
    color: @secondColor;

    .instanceListOpt {
      display: grid;
      grid-template-columns: auto 40px;

      .instanceListTitle {
      }
    }

    .instanceListItem {
      cursor: pointer;
      border-radius: 5px;
      padding: 10px;
      background-color: #2a2d2e;
      display: block;
      color: @primaryColor;
      border-bottom: none;

      &:nth-child(n + 2) {
        margin-top: 10px;
      }

      &:hover {
        background-color: #3d3d3d;
      }

      &:active {
        background-color: #444;
      }

      .instanceInfo {
        display: grid;
        grid-template-columns: 30px auto 20px;

        .icon {
          font-size: 22px;
        }

        .version {
          font-size: 10px;
        }

        .instanceCheckBox {
          text-align: right;

          :global {
            .ant-checkbox-inner {
              background-color: #4b4b4b;
              border: 1px solid #737373;
            }
          }
        }
      }

      .instanceStatus {
        display: flex;
        flex-wrap: nowrap;
        margin-top: 10px;
        font-size: 12px;

        > div {
          text-align: center;
          border-radius: 5px;
          flex: 1;

          &:nth-child(n+2) {
            margin-left: 10px;
          }

          &.statusSynced {
            background-color: @success-color;
          }

          &.statusNotSynced {
            background-color: @error-color;
          }
        }

      }

    }
  }
}


.emptyTip {
  text-align: center;
  padding: 20px 0;
}
